package com.tom.architect.day20.simple2;

/**
 * Added by Tom on 2023/12/27.
 */
public class Client {
    public static void main(String[] args) {
        // 三个角色：命令角色、命令的接收者(执行者)、命令的发送者。
        TetrisMachine machine = new TetrisMachine();
        LeftCommand leftCommand = new LeftCommand(machine);
        RightCommand rightCommand = new RightCommand(machine);

        Buttons buttons = new Buttons();
        buttons.setLeftCommand(leftCommand);
        buttons.setRightCommand(rightCommand);
        buttons.toRight();
        buttons.toLeft();
        buttons.toRight();


//        TetrisMachine machine = new TetrisMachine();
//        machine.toLeft();
//        machine.toRight();

    }
}
